from .manage import Base
from sqlalchemy import Column, String


class Team_info(Base):
    """团队表"""

    __tablename__ = "team_info"
    __table_args__ = {"extend_existing": True}

    uid = Column(String, primary_key=True)
    name = Column(String, nullable=True)
    create_user = Column(String, nullable=True)
    create_time = Column(String, nullable=True)
    describe = Column(String, nullable=True)
    roles = Column(String, nullable=True)


class Team_user(Base):
    """团队成员表"""

    __tablename__ = "team_user"
    __table_args__ = {"extend_existing": True}

    uid = Column(String, primary_key=True)
    team_uid = Column(String, nullable=True)
    user_uid = Column(String, nullable=True)
    role = Column(String, nullable=True)
    join_time = Column(String, nullable=True)
    last_activity = Column(String, nullable=True)
    nick_name = Column(String, nullable=True)


class Project_info(Base):
    """项目信息表"""

    __tablename__ = "project_info"
    __table_args__ = {"extend_existing": True}

    uid = Column(String, primary_key=True)
    name = Column(String, nullable=True)
    new_version = Column(String, nullable=True)
    create_time = Column(String, nullable=True)
    describe = Column(String, nullable=True)


class Project_user(Base):
    """项目成员表"""

    __tablename__ = "project_user"
    __table_args__ = {"extend_existing": True}

    uid = Column(String, primary_key=True)
    user_id = Column(String, nullable=True)
    team = Column(String, nullable=True)
    join_time = Column(String, nullable=True)
    role = Column(String, nullable=True)
    describe = Column(String, nullable=True)
    last_activity = Column(String, nullable=True)


class Module_info(Base):
    """模块表"""

    __tablename__ = "module_info"
    __table_args__ = {"extend_existing": True}

    uid = Column(String, primary_key=True)
    name = Column(String, nullable=True)
    team = Column(String, nullable=True)
    project = Column(String, nullable=True)
    create_user = Column(String, nullable=True)
    create_time = Column(String, nullable=True)
